<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/default.xhtml">

	<ui:define name="menu">
		<ul>
			<li><h:link value="Home"  outcome="/index" /> </li>
			<li><h:link class="akt" value="Users"  outcome="/content/user/list" /> </li>
			<li><h:link value="Resources"  outcome="/content/resource/list" /> </li>
			<li><h:link value="Tasks"  outcome="/content/task/list" /> </li>
		    <li><h:link value="Task types"  outcome="/content/tasktype/list" /> </li> 
		</ul>
		<p class="vonal"><br/></p>
	</ui:define>
	
	<ui:define name="content2">
		<h:button value="Create new user" 
				outcome="/content/user/edit" 
				class="btnCommand" />
		<br/><br/>
		<h:form id="userListForm">
			<h:dataTable id="userTable"
				value="#{userBean.all}" var="user" 
				styleClass="userTable"
				columnClasses="userTableName, userTableUserName, userTableEmail, userTablePhone "
				rowClasses="userTableOddRow, userTableEvenRow">

				<h:column headerClass="userTableHeaderName" >
					<f:facet name="header">Name</f:facet>
					<h:link outcome="/content/user/edit" value="#{user.name}">
						<f:param name="id" value="#{user.id}" />
					</h:link>
					<!-- 					<h:outputText value="#{user.name}" /> -->
				</h:column>
				
				<h:column headerClass="userTableHeaderUserName">
					<f:facet name="header">Username</f:facet>
					<h:outputText value="#{user.username}" />
				</h:column>

				<h:column headerClass="userTableHeaderEmail">
					<f:facet name="header">Email</f:facet>
					<h:outputText value="#{user.email}" />
				</h:column>

				<h:column headerClass="userTableHeaderPhone">
					<f:facet name="header">Phone Number</f:facet>
					<h:outputText value="#{user.phoneNumber}" />
				</h:column>

			</h:dataTable>
			<br/>
		</h:form>

	</ui:define>
</ui:composition>
